package io.sdph.core;

import io.sdph.order.IOrderManager;
import io.sdph.products.IMagazineManager;
import io.sdph.products.IProductManager;
import io.sdph.userprofile.ISessionManager;
import io.sdph.userprofile.IUserManager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ComponentContainer {
	
	@Autowired
	private ISessionManager sessionManager;
	@Autowired 
	private IOrderManager orderManager;
	@Autowired
	private IProductManager productManager;
	@Autowired 
	private IMagazineManager magazineManager;
	@Autowired
	private IUserManager userManager;
	
	private static ComponentContainer cn;
	
	public ComponentContainer() {
		cn = this;
	}

	public ISessionManager getSessionManager() {
		return sessionManager;
	}

	public IOrderManager getOrderManager() {
		return orderManager;
	}

	public IProductManager getProductManager() {
		return productManager;
	}

	public IMagazineManager getMagazineManager() {
		return magazineManager;
	}

	public IUserManager getUserManager() {
		return userManager;
	}

	public static ComponentContainer getInstance() {
		return cn;
	}
	
}
